home *** CD-ROM | disk | FTP | other *** search
/ MacTech 1 to 12 / MacTech-vol-1-12.toast / Reference / FAQs on CD / C++ FAQ Lite (1⁄7) next >
Encoding:
Text File  |  1997-01-17  |  43.2 KB  |  1,112 lines  |  [TEXT/R*ch]

  1. Archive-name: C++-faq/part1
  2. Posting-Frequency: monthly
  3. Last-modified: Jan 1, 1997
  4. URL: http://www.cerfnet.com/~mpcline/c++-faq-lite/
  5.  
  6. AUTHOR: Marshall Cline / cline@parashift.com / Paradigm Shift, Inc. /
  7. One Park St. / Norwood, NY 13668 / 315-353-6100 (voice) / 315-353-6110 (fax)
  8.  
  9. COPYRIGHT: This posting is part of "C++ FAQ Lite."  The entire "C++ FAQ Lite"
  10. document is Copyright(C) 1991-96 Marshall P. Cline, Ph.D., cline@parashift.com.
  11. All rights reserved.  Copying is permitted only under designated situations.
  12. For details, see section [1].
  13.  
  14. NO WARRANTY: THIS WORK IS PROVIDED ON AN "AS IS" BASIS.  THE AUTHOR PROVIDES NO
  15. WARRANTY WHATSOEVER, EITHER EXPRESS OR IMPLIED, REGARDING THE WORK, INCLUDING
  16. WARRANTIES WITH RESPECT TO ITS MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR
  17. PURPOSE.
  18.  
  19. C++-FAQ-Lite != C++-FAQ-Book: This document, C++ FAQ Lite, is not the same as
  20. the C++ FAQ Book.  The book (C++ FAQs, Cline and Lomow, Addison-Wesley) is 500%
  21. larger than this document, and is available in bookstores.  For details, see
  22. section [3].
  23.  
  24. ==============================================================================
  25.  
  26. This "raw text" document was mechanically produced from the HTML version at:
  27.     USA:    http://www.cerfnet.com/~mpcline/c++-faq-lite/
  28.     U.K.:    http://www.cs.bham.ac.uk/~jdm/CPP/index.html
  29.     Germany:    http://www.informatik.uni-konstanz.de/~kuehl/cpp/cppfaq.htm
  30.     Finland:    http://www.utu.fi/~sisasa/oasis/cppfaq/
  31.     Taiwan:    http://www.cis.nctu.edu.tw/c++/C++FAQ-English/
  32.  
  33. If you have a Web browser, you probably want to read one of the above HTML
  34. sites instead of this document because:
  35.  * The HTML version has many hyperlinked cross references.
  36.  * The HTML version is MUCH easier to read than this "raw text" version.
  37.  * The HTML version is updated more regularly than this "monthly posting".
  38.  
  39. ==============================================================================
  40.  
  41. Improve network response:
  42.  
  43.  * Use the closest mirror site (see URLs above).
  44.  * Browse the FAQ off-line: Use the one-click download feature to get your own
  45.    local copy.[NEW!]
  46.  
  47. Look up stuff:
  48.  
  49.  * Look up a generic topic with the table of contents (35 coarse-grained
  50.    topics).
  51.  * Look up a specific topic with the extensive subject index (696 fine-grained
  52.    topics).
  53.  * Look up the changed topics with the chain of recent changes (28 changes for
  54.    11/96 and 1/97).
  55.  
  56. Table of Contents:
  57.  
  58.  * [1] Copying permissions
  59.  * [2] On-line sites that distribute this document
  60.  * [3] C++-FAQ-Book versus C++-FAQ-Lite
  61.  * [4] Recent changes to this document
  62.  * [5] Netiquette when posting to comp.lang.c++
  63.  * [6] Big Picture issues
  64.  * [7] Classes and objects
  65.  * [8] References
  66.  * [9] Inline functions
  67.  * [10] Constructors
  68.  * [11] Destructors
  69.  * [12] Assignment operators
  70.  * [13] Operator overloading
  71.  * [14] Friends
  72.  * [15] Input/output via <iostream.h> and <stdio.h>
  73.  * [16] Freestore management
  74.  * [17] Exceptions and error handling
  75.  * [18] Const correctness
  76.  * [19] Inheritance -- basics
  77.  * [20] Inheritance -- virtual functions
  78.  * [21] Inheritance -- proper inheritance and substitutability
  79.  * [22] Inheritance -- abstract base classes (ABCs)
  80.  * [23] Inheritance -- what your mother never told you
  81.  * [24] Inheritance -- private and protected inheritance
  82.  * [25] Coding standards
  83.  * [26] Learning OO/C++
  84.  * [27] Learning C++ if you already know Smalltalk
  85.  * [28] Reference and value semantics
  86.  * [29] How to mix C and C++
  87.  * [30] Pointers to member functions
  88.  * [31] Container classes and templates
  89.  * [32] Class libraries
  90.  * [33] Compiler dependencies
  91.  * [34] Miscellaneous technical issues
  92.  * [35] Miscellaneous environmental issues
  93.  
  94. ==============================================================================
  95.  
  96. Subject Index
  97.  
  98. "A"
  99.  * ABC (see also Inheritance) ... [22.2], [22.3]
  100.  * Access rules
  101.    - protected: and private: inheritance ... [24.6]
  102.    - protected: and private: members ... [19.5], [19.6]
  103.  * Acronyms ... [5.1]
  104.  * Ada vs. C++ ... [6.4]
  105.  * Aliasing
  106.    - Aliasing of const and non-const pointers ... [18.9], [18.11], [18.12],
  107.      [18.13]
  108.    - References are aliases for objects ... [8.1], [8.5]
  109.  * All Terrain Vehicle (ATV) ... [27.5]
  110.  * ANSI ... [6.12]
  111.    - ANSI-C ... [6.10]
  112.    - ANSI-C++ committee "X3J16" ... [6.11], [27.1]
  113.  * Arity ... [13.7]
  114.  * Arrays
  115.    - Arrays are evil ... [10.5], [13.6], [16.16], [17.3], [21.5]
  116.    - Specifying length at runtime ... [16.17]
  117.  * Assignment operator ... [12]
  118.    - Check for self-assignment ... [22.5], [25.8]
  119.    - Return *this ... [25.8]
  120.    - Self-assignment ... [12.1], [12.2], [12.3]
  121.    - Use const in parameter ... [25.8]
  122.  * Associative array (see also STL) ... [31.1]
  123.  * Associativity ... [13.7]
  124.  * Author (see also C++ FAQ Lite) ... [1.1]
  125.  * auto_ptr ... [17.2]
  126.  
  127. "B"
  128.  * Backtracking ... [5.3]
  129.  * bad_alloc (see also Freestore) ... [16.5], [16.6]
  130.  * Bag of Apple vs. of Fruit ... [21.3]
  131.  * Base class ... [19.3]
  132.  * Beautifier, Code (see Pretty printing) ... [35.2]
  133.  * Big Picture issues (see Managerial issues) ... [6]
  134.  * Big Three, Law of ... [16.16], [22.5], [25.8]
  135.  * Binary compatibility between vendors ... [33.6]
  136.  * Binding: Static vs. dynamic ... [20.2], [20.3]
  137.  * Book (see C++ FAQ Book) ... [3]
  138.  * Books on C++ ... [26]
  139.  * BTW (Acronym) ... [5.1]
  140.  * Business criteria dominate technical criteria ... [6.4]
  141.  
  142. "C"
  143.  * C++2LaTeX (see Pretty printing) ... [35.2]
  144.  * C++ books ... [26]
  145.  * C++ FAQ Book ... [3]
  146.    - Available only in bookstores ... [3.3]
  147.    - Is 500% bigger than this Lite document ... [3.4]
  148.    - ISBN ... [3.1]
  149.    - Not same as the on-line ("Lite") document ... [3.2]
  150.  * C++ FAQ Lite ... [3]
  151.    - Author ... [1.1]
  152.    - Availability on-line ... [2]
  153.    - Book is 500% bigger ... [3.4]
  154.    - Chinese translation ... [2.4]
  155.    - Copy permissions ... [1]
  156.    - Copying permissions ... [1.3]
  157.    - Copyright notice ... [1.2]
  158.    - HTML version ... [2.2]
  159.    - Mirror WWW sites ... [2.1]
  160.    - No Warranty ... [1.4]
  161.    - Not same as C++ FAQ Book ... [1.5], [3.2]
  162.    - Plaintext version ... [2.3]
  163.    - Recent changes ... [4]
  164.  * C language
  165.    - Accessing C++ data members from C ... [29.9]
  166.    - C++ backward compatibility ... [6.10]
  167.    - C++ is higher level than C ... [29.10]
  168.    - C vs. C++ ... [6.4]
  169.    - Calling C from C++ ... [29.5]
  170.    - Calling C++ from C ... [29.6]
  171.    - Coding standards different from C++ ... [25.3]
  172.    - Common linker errors ... [23.4], [29.7]
  173.    - __cplusplus ... [29.4]
  174.    - extern C ... [29.3]
  175.    - Including C headers ... [29.2], [29.3], [29.4]
  176.    - Linking must be directed by C++ ... [29.1]
  177.    - main() must be compiled using C++ ... [29.1]
  178.    - Mixing C and C++ code ... [29]
  179.    - Newsgroup comp.lang.c ... [5.8]
  180.    - Not an efficient way to learn OO/C++ ... [26.2]
  181.    - Passing C++ objects to C code ... [29.8], [29.9]
  182.    - static at file-scope ... [7.5]
  183.  * C++ Libraries FAQ ... [32.8]
  184.  * Changes to this document (see also C++ FAQ Lite) ... [4]
  185.  * char*: Use a string-like class instead ... [13.6], [17.3]
  186.  * Chinese translation of this document ... [2.4]
  187.  * Circles vs. Ellipses ... [21.6], [21.7], [21.8], [21.9]
  188.  * class ... [7.1], [7.8]
  189.  * clone() methods ... [16.21], [20.5], [22.5]
  190.  * Coding standards ... [25]
  191.    - Assignment operators check assignment-to-self ... [12.1], [25.8]
  192.    - Assignment operators return *this ... [25.8]
  193.    - Assignment operators use const ... [25.8]
  194.    - Avoid arrays whenever possible ... [21.5]
  195.    - Avoid dynamically typed libraries ... [32.4]
  196.    - Avoid global variables ... [34.2]
  197.    - Avoid hiding nested identifiers ... [34.2]
  198.    - Bloodshed, Jihads, and Heat vs. Light ... [25.1]
  199.    - Coding standards are never sufficient ... [25.2]
  200.    - Coding standards are sometimes necessary ... [25.2]
  201.    - Copy constructors use const ... [25.8]
  202.    - Declare near first use ... [25.5]
  203.    - Design classes from the outside-in ... [13.9]
  204.    - Don't base C++ standards on C standards ... [25.3]
  205.    - Don't test for NULL after new ... [16.5]
  206.    - Don't test for NULL before delete ... [16.7]
  207.    - Explicitly calling destructors (Don't!) ... [11.5], [11.6], [11.9]
  208.    - Explicitly calling destructors (OK sometimes) ... [11.10]
  209.    - Header filename extensions ... [25.7]
  210.    - Identifier naming conventions ... [25.9]
  211.    - Initialization lists ... [25.8]
  212.    - Law of the Big Three ... [16.16], [25.8]
  213.    - Operator overloading ... [25.8]
  214.    - Source filename extensions ... [25.6]
  215.    - static at file-scope (Don't!) ... [7.5]
  216.    - The Ellemtel coding guidelines ... [25.10]
  217.    - Todd Hoff's coding guidelines ... [25.10]
  218.    - Use a string object rather than a char* ... [13.6], [17.3]
  219.    - Use delete[] for arrays ... [16.11]
  220.    - Use of the ternary ?: operator ... [25.4]
  221.    - virtual destructor coding standard ... [25.8]
  222.  * Combinations ... [5.3]
  223.  * Committee Draft (CD) for ANSI/ISO-C++ ... [6.12]
  224.  * Compatibility, Binary ... [33.6]
  225.  * Compiler dependencies ... [33], [33.3]
  226.  * Composition
  227.    - Benefits compared to freestore ... [28.4], [28.5]
  228.    - Compared with private inheritance ... [24.2]
  229.    - Criteria for composition vs. private inheritance ... [24.3]
  230.    - Inlining virtual functions ... [28.5], [28.6]
  231.  * const_cast ... [18.10]
  232.  * Const correctness ... [18], [18.1]
  233.    - A form of type safety ... [18.2]
  234.    - Aliasing of const and non-const pointers ... [18.12]
  235.    - Coding standards concerning ... [25.8], [25.8]
  236.    - const_cast ... [18.10], [18.11]
  237.    - const member functions ... [18.9]
  238.    - Fred& const x is nonsense ... [18.7]
  239.    - Fred const& x -- use const Fred& x instead ... [18.8]
  240.    - Immutable (const) pointers ... [18.5]
  241.    - mutable ... [18.10]
  242.    - Pointer-to-const ... [18.4], [18.5]
  243.    - Pointer-to-const aliasing ... [18.13]
  244.    - Reference-to-const ... [18.6]
  245.    - Retrofitting const correctness is hard ... [18.3]
  246.  * Constructors ... [10], [16.9]
  247.    - Build objects from dust ... [10.1]
  248.    - Calling a virtual from ... [23.1]
  249.    - Calling another constructor ... [10.3]
  250.    - Coding standards re. copy constructor ... [25.8]
  251.    - Default constructors ... [10.4], [10.5]
  252.    - Init methods ... [10.3]
  253.    - Initialization coding standard ... [25.8]
  254.    - Member objects should be self-managing ... [17.2]
  255.    - Named Constructor Idiom ... [10.6], [16.18], [16.21]
  256.    - Throwing exceptions ... [17.1]
  257.    - Virtual Constructor Idiom ... [16.21], [20.5], [22.5]
  258.  * Containers ... [31]
  259.    - Container of Thing vs. of Anything ... [21.4]
  260.    - Heterogeneous ... [31.2]
  261.    - Iterators ... [31.3]
  262.  * Copy constructors
  263.    - Should use const ... [25.8]
  264.  * Copy on write (see Reference counting) ... [16.20], [16.21]
  265.  * Copy semantics (see also Value semantics) ... [28.1]
  266.  * Copying permissions (see also C++ FAQ Lite) ... [1], [1.3]
  267.  * Copyright notice (see also C++ FAQ Lite) ... [1.2]
  268.  * Crash at runtime without any warning ... [11.5], [11.6], [16.2], [16.4],
  269.    [16.11], [16.12], [17.3], [20.4], [21.1], [21.4], [21.5], [34.2]
  270.  * create() methods (see Named Constructor Idiom) ... [10.6], [16.18], [16.21]
  271.  * Ctor (see also Constructors) ... [10]
  272.  
  273. "D"
  274.  * Dangerous programming practices ... [11.5], [11.6], [11.10], [13.6], [16.2],
  275.    [16.4], [16.11], [16.12], [16.16], [17.3], [20.4], [21.1], [21.4], [21.5],
  276.    [23.3], [34.2]
  277.  * Declarations
  278.    - Declare near first use ... [25.5]
  279.    - List x(); declares a function, not an object ... [10.2]
  280.  * Decompiling executables back into C++ source code ... [33.2]
  281.  * Default parameters ... [10.3]
  282.  * #define macros (see also Inline functions) ... [9.1], [9.3], [26.2], [27.3],
  283.    [29.4], [30.5], [30.6]
  284.  * delete ... [16.1]
  285.    - delete p actually deletes *p, not p ... [16.1]
  286.    - delete this ... [16.14]
  287.    - delete[] uses magic ... [16.13], [33.4], [33.5]
  288.    - delete[] vs. delete ... [16.11]
  289.    - delete[] vs. delete for builtin types ... [16.12]
  290.    - Deleting an array with delete[] ... [16.10]
  291.    - Mixing with malloc() ... [16.2]
  292.  * Derived classes ... [19.3]
  293.    - Can access protected parts of Base ... [19.7]
  294.    - Can't access private parts of Base ... [19.6]
  295.    - Derived* to Base* conversion ... [19.4], [21.2]
  296.    - Derived** to Base** conversion (invalid) ... [21.2]
  297.    - Derived* to private Base* conversion (invalid) ... [24.4]
  298.  * Design books ... [26.7]
  299.  * Destructors ... [11], [16.8], [16.13], [33.4], [33.5]
  300.    - Base class subobjects are automagically destructed ... [11.12]
  301.    - Calling a virtual from ... [23.1]
  302.    - Can't be overloaded ... [11.4]
  303.    - Coding standards concerning ... [25.8]
  304.    - Controlling lifetimes of locals ... [11.6], [11.7], [11.8]
  305.    - Explicitly calling them (Don't!) ... [11.5], [11.6], [11.9]
  306.    - Explicitly calling them (OK sometimes) ... [11.10]
  307.    - Last rites ... [11.1]
  308.    - Member objects are automagically destructed ... [11.11]
  309.    - Order of destruction for array elements ... [11.3]
  310.    - Order of destruction for locals ... [11.2]
  311.    - virtual destructor coding standard ... [20.4]
  312.  * Dijkstra ... [5.3]
  313.  * Directory separator: use "/", not "\" ... [15.10], [34.1]
  314.  * Downloading
  315.    - HTML version of C++ FAQ Lite ... [2.2]
  316.    - HTML version of this document ... [2.1]
  317.    - Plaintext version of C++ FAQ Lite ... [2.3]
  318.  * Dtor (see also Destructors) ... [11]
  319.  * Dynamic
  320.    - Dynamic binding ... [6.7], [20.2], [20.3]
  321.    - dynamic_cast ... [31.2]
  322.    - Dynamic length arrays ... [16.17]
  323.    - Dynamic typing ... [20.2], [27.2], [27.3], [32.4], [32.5]
  324.  
  325. "E"
  326.  * Ellemtel coding guidelines (see also Coding standards) ... [25.10]
  327.  * Ellipses vs. Circles ... [21.6], [21.7], [21.8], [21.9]
  328.  * Encapsulation ... [6.7], [7]
  329.    - Definition ... [7.4]
  330.    - Hides stuff from code, not from people ... [7.6]
  331.    - Not necessarily violated by friends ... [14.2]
  332.    - Security vs. Encapsulation ... [7.7]
  333.  * End-of-file (see Input/output) ... [15.2], [15.4]
  334.  * Equation parsing in C++ ... [5.3]
  335.  * Etiquette (see also Netiquette) ... [5]
  336.  * Exceptions ... [17]
  337.    - Constructors can throw exceptions ... [17.1]
  338.    - Example of throw; to re-throw current exception ... [16.9], [17.3],
  339.      [33.4], [33.5]
  340.    - Example of try ... catch ... [16.9], [17.3], [33.4], [33.5]
  341.    - Member objects should be self-managing ... [17.2]
  342.  * Executables -- decompiling back to C++ source code ... [33.2]
  343.  * extern C (see also C language) ... [29], [29.3]
  344.  
  345. "F"
  346.  * Features of C++ from a business perspective ... [6.7]
  347.  * Filenames
  348.    - Extensions for header files ... [25.7]
  349.    - Extensions for source code files ... [25.6]
  350.    - Using "/" rather than "\" for directories ... [15.10], [34.1]
  351.  * find_if ... [32.2]
  352.  * Floating point ... [34.5], [35.5]
  353.  * for loop ... [34.2]
  354.  * FORTRAN vs. C++ ... [6.4]
  355.  * free() (see also Freestore) ... [16.2]
  356.  * Freestore ... [16]
  357.    - Allocating an array with new T[n] ... [16.10]
  358.    - Automating a NULL test ... [16.6]
  359.    - bad_alloc ... [16.5], [16.6]
  360.    - delete handles NULL automatically ... [16.7]
  361.    - delete has two steps ... [16.8]
  362.    - delete this ... [16.14]
  363.    - delete[] uses magic ... [16.13], [33.4], [33.5]
  364.    - delete[] vs. delete ... [16.11]
  365.    - delete[] vs. delete for builtin types ... [16.12]
  366.    - Deleting an array with delete[] ... [16.10]
  367.    - Mixing malloc() and delete ... [16.2]
  368.    - Mixing new and free() ... [16.2]
  369.    - Multi-dimensional arrays ... [16.15], [16.16]
  370.    - new has two steps ... [16.9]
  371.    - new never returns NULL ... [16.5]
  372.    - Placement new ... [11.10], [16.9]
  373.    - Prohibiting local objects ... [16.18]
  374.    - realloc() ... [16.4]
  375.    - Reference counting ... [16.19], [16.20], [16.21]
  376.    - Runtime costs of heap ... [28.4], [28.5]
  377.    - set_new_handler ... [16.6]
  378.    - Why use new rather than malloc() ... [16.3]
  379.  * Friends ... [14]
  380.    - Choosing between members and friends ... [14.5]
  381.    - Definition of friend ... [14.1]
  382.    - friend doesn't necessarily violate encapsulation ... [14.2]
  383.    - Friendship privileges aren't inherited ... [14.4]
  384.    - Friendship privileges aren't transitive ... [14.4]
  385.    - istream operator>> ... [15.7]
  386.    - ostream operator<< ... [15.6]
  387.    - ostream operator<< (virtual) ... [15.8]
  388.    - Pros and cons of friends ... [14.3]
  389.    - Virtual Friend Function Idiom ... [14.3], [15.8]
  390.  * From: line of a posting (see also Netiquette) ... [5.4]
  391.  * FTP sites
  392.    - 128.231.128.7 ... [32.5]
  393.    - butler.hpl.hp.com ... [32.1]
  394.    - ftp.cs.rpi.edu ... [32.1]
  395.    - ftp.cygnus.com ... [6.12]
  396.    - ftp.germany.eu.net ... [35.2]
  397.    - ftp.maths.warwick.ac.uk ... [6.12], [6.12]
  398.    - ftp.netlab.cs.rpi.edu ... [35.4]
  399.    - ftpt.su.edu.au ... [6.12], [6.12]
  400.    - garbo.uwasa.fi ... [5.8]
  401.    - oak.oakland.edu ... [5.8]
  402.    - research.att.com ... [6.12], [6.12]
  403.    - rtfm.mit.edu ... [5.9]
  404.    - venus.ycc.yale.edu ... [35.2]
  405.    - www.cs.rpi.edu ... [32.1]
  406.    - www.cygnus.com ... [35.2]
  407.    - www.maths.warwick.ac.uk ... [32.1]
  408.  * FWIW (Acronym) ... [5.1]
  409.  * FYI (Acronym) ... [5.1]
  410.  
  411. "G"
  412.  * Generalization (see also Inheritance) ... [19.3]
  413.  * Genericity (see also Templates) ... [31.8]
  414.  * Global variables: Just Say No! ... [34.2]
  415.  * GNU
  416.    - emacs ... [35.3]
  417.    - g++ ... [5.8]
  418.  * Graphics ... [5.8]
  419.  * Growth of C++ ... [6.5], [6.7]
  420.  
  421. "H"
  422.  * Has-a (see also Composition) ... [19.2], [24.2]
  423.  * Header filename extensions ... [25.7]
  424.  * Heap-sort ... [5.3]
  425.  * Heat vs. light ... [25.1]
  426.  * Heterogeneous containers ... [31.2]
  427.  * Hiding inherited public features ... [21.1], [21.6], [21.7], [21.8]
  428.  * Hiding rule ... [23.3]
  429.  * Homework problems ... [5.2], [5.3]
  430.  * Homogeneous containers ... [31.2]
  431.  * Hostility ... [29.10]
  432.  * How to learn OO/C++ ... [26]
  433.  * HTML version of C++ FAQ Lite ... [2.2]
  434.  * Hybrid OO programming languages ... [26.3]
  435.  * Hype ... [6.3]
  436.  
  437. "I"
  438.  * Idioms
  439.    - Named Constructor Idiom ... [10.6], [16.18], [16.21]
  440.    - Virtual Constructor Idiom ... [16.21], [20.5], [22.5]
  441.    - Virtual Friend Function Idiom ... [15.8]
  442.  * IMHO (Acronym) ... [5.1]
  443.  * Immutable (const) pointers ... [18.5]
  444.  * IMNSHO (Acronym) ... [5.1]
  445.  * IMO (Acronym) ... [5.1]
  446.  * Imperfect programming languages ... [6.2]
  447.  * #include
  448.    - Including C headers ... [29.2], [29.3], [29.4]
  449.    - Use forward slash "/", not backslash "\" ... [34.1]
  450.  * indent (see Pretty printing) ... [35.2]
  451.  * Indirection, Extra layers of ... [28.5]
  452.  * Infix operators ... [5.3]
  453.  * Inheritance ... [6.7], [19], [20], [21], [22], [23]
  454.    - Abstract base classes (ABCs) ... [22], [22.2], [22.3]
  455.    - Access of private: by derived ... [19.6]
  456.    - Access of protected: and private: ... [19.5]
  457.    - Access of protected: by derived ... [19.7]
  458.    - Array of Derived vs. of Base ... [21.4]
  459.    - Calling virtuals from constructors ... [23.1]
  460.    - Circle vs. Ellipse ... [21.6], [21.7], [21.8], [21.9]
  461.    - Derived* to Base* conversion ... [19.4], [21.2]
  462.    - Derived** to Base** conversion (invalid) ... [21.2]
  463.    - Derived* to private Base* conversion (invalid) ... [24.4]
  464.    - Differences between C++ and Smalltalk inheritance ... [27.4]
  465.    - Hiding inherited public features ... [21.1]
  466.    - Hiding rule ... [23.3]
  467.    - How to code inheritance ... [19.3]
  468.    - Importance of inheritance ... [19.1]
  469.    - Is-a-kind-of ... [19.2]
  470.    - Multiple inheritance ... [6.7], [11.12], [24.2], [29.8], [29.9], [33.6],
  471.      [33.9]
  472.    - Old code calls new code ... [6.9]
  473.    - Parking-lot of Car vs. of Vehicle ... [21.3]
  474.    - private inheritance ... [24], [24.1]
  475.    - private inheritance access rules ... [24.6]
  476.    - private inheritance vs. composition ... [24.2], [24.3]
  477.    - protected inheritance access rules ... [24.6]
  478.    - protected vs. private inheritance ... [24.5]
  479.    - Pure virtual functions ... [22.4]
  480.    - Redefining non-virtuals ... [23.2]
  481.    - Smalltalk differences ... [27.5]
  482.    - Specification device ... [19.2]
  483.    - virtual constructors ... [16.21], [20.5], [22.5]
  484.    - virtual data ... [28.2], [28.3]
  485.    - virtual destructor coding standard ... [20.4]
  486.    - virtual functions ... [20.1]
  487.    - virtual functions are central to OO ... [6.8]
  488.    - virtual inheritance ... [11.12], [29.8], [29.9], [33.6], [33.9]
  489.    - What your Mother didn't tell you ... [23]
  490.    - When to use inheritance ... [19.2]
  491.  * Initialization lists (see also Coding standards) ... [25.8]
  492.  * Initialization of a static member datum ... [10.7], [10.8]
  493.  * Inline functions ... [9]
  494.    - Better than #define macros ... [9.3]
  495.    - Can degrade performance ... [9.7]
  496.    - Defined outside class body ... [9.5]
  497.    - Defined within class body ... [9.6]
  498.    - Inlining virtual functions ... [28.5], [28.6]
  499.    - Like a #define macro ... [9.1]
  500.    - Member functions ... [9.5]
  501.    - Non-member functions ... [9.4]
  502.    - Safety without loss of speed ... [6.7], [9.2]
  503.  * Input/output ... [15]
  504.    - Binary mode on MS-DOS ... [15.9]
  505.    - istream and eof ... [15.2], [15.4]
  506.    - istream and invalid input characters ... [15.2]
  507.    - istream and while (cin >> foo) ... [15.3]
  508.    - istream operator>> ... [15.7]
  509.    - istream remembers bad state ... [15.5]
  510.    - ostream operator<< ... [15.6]
  511.    - ostream operator<< (virtual) ... [15.8]
  512.  * Inspector methods ... [18.9]
  513.  * Interfaces
  514.    - A simplified view in the user's vocabulary ... [7.3]
  515.    - Abstract base classes (ABCs) ... [22.2]
  516.    - Design interfaces from the outside-in ... [13.9]
  517.    - Goal of interface design ... [7.4]
  518.    - More valuable than implementation ... [22.1]
  519.    - protected interface ... [19.7]
  520.    - Separate from implementation ... [22.2]
  521.  * Intuition isn't always correct ... [21.3], [21.4], [21.6], [21.7], [21.8]
  522.  * Invalid input characters (see Input/output) ... [15.2]
  523.  * iostream.h ... [15.1]
  524.  * Is-a-kind-of (see also Inheritance) ... [19.2]
  525.  * ISO ... [6.12]
  526.    - ISO-C ... [6.10]
  527.    - ISO-C++ committee "WG21" ... [6.11]
  528.  * Iterators ... [31.3]
  529.  
  530. "J"
  531.  * Java vs. C++ ... [6.4]
  532.  
  533. "K"
  534.  * Kind-of (see also Inheritance) ... [19.2]
  535.  * Kruskal ... [5.3]
  536.  * KUTGW (Acronym) ... [5.1]
  537.  
  538. "L"
  539.  * Language wars ... [6.4]
  540.  * Large executables ... [32.7], [33.7]
  541.  * Last rites (see also Destructors) ... [11.1]
  542.  * LaTeX
  543.    - C++2LaTeX pretty printer ... [35.2]
  544.    - Macros for "C++" ... [35.1]
  545.  * Law of the Big Three ... [16.16], [22.5], [25.8]
  546.  * Layer of indirection ... [28.5]
  547.  * Learning OO/C++ ... [26]
  548.  * Learning OO/C++
  549.    - How long does it take ... [6.6]
  550.    - No need to learn C first ... [26.2]
  551.    - No need to learn Smalltalk first ... [26.3]
  552.  * Legality books on C++ ... [26.4], [26.6]
  553.  * Length of time needed to learn OO/C++ ... [6.6]
  554.  * Libraries FAQ ... [32.8]
  555.  * Libraries ... [32]
  556.    - Dynamically typed C++ libraries ... [32.4], [32.5]
  557.    - Large executables ... [32.7], [33.7]
  558.    - Numerical Recepies ... [32.6]
  559.    - STL ... [32.1], [32.3]
  560.  * Lifetime of objects
  561.    - Controlling lifetime of locals ... [11.6], [11.7], [11.8]
  562.    - In heterogeneous containers ... [31.2]
  563.    - New rule for for loop variables ... [34.2]
  564.    - Order of destruction for array elements ... [11.3]
  565.    - Order of destruction for locals ... [11.2]
  566.    - Register liveness ... [28.5]
  567.    - Using friend classes to achieve separate lifetimes ... [14.2]
  568.  * Linker errors ... [10.8], [23.4], [29.7], [35.5]
  569.  
  570. "M"
  571.  * malloc()
  572.    - (See also Freestore) ... [16.2]
  573.    - Why new is preferred over malloc() ... [16.3]
  574.  * Managerial issues ... [6]
  575.    - Business-centricity vs. Techno-centricity ... [6.4]
  576.    - C++ is a practical tool ... [6.1]
  577.    - C++ is not a perfect tool ... [6.2]
  578.    - Growth of C++ ... [6.5]
  579.    - Length of time needed to learn OO/C++ ... [6.6]
  580.    - Some advantages of OO ... [6.3]
  581.    - Standardization of C++ ... [6.11], [6.12]
  582.  * map<Key,Value> (see also STL) ... [31.1]
  583.  * Maseratti ... [27.5]
  584.  * Matrix subscript operator ... [13.8]
  585.  * Mentoring ... [6.6], [26.1]
  586.  * Merge-sort ... [5.3]
  587.  * MFC ... [33.1]
  588.  * Microsoft Windows ... [5.8], [15.9], [35.4]
  589.  * Minimum Spanning Trees in C++ ... [5.3]
  590.  * Mirror sites (see also This document) ... [2]
  591.  * Mixing
  592.    - Mixing C and C++ code (see also C language) ... [29]
  593.    - Mixing malloc() and delete ... [16.2]
  594.    - Mixing new and free() ... [16.2]
  595.  * Monolithic class hierarchies ... [32.4], [32.5]
  596.  * Morality books on C++ ... [26.4], [26.5]
  597.  * MS-DOS ... [5.8], [15.9], [35.4]
  598.  * Multi-dimensional arrays ... [16.15], [16.16]
  599.  * Multiple
  600.    - Multiple encapsulated instances ... [6.7], [7.5], [31.3]
  601.    - Multiple inheritance ... [6.7], [11.12], [24.2], [29.8], [29.9], [33.6],
  602.      [33.9]
  603.  * mutable ... [18.10]
  604.  * Mutator methods ... [18.9]
  605.  * MYOB (Acronym) ... [5.1]
  606.  
  607. "N"
  608.  * Named Constructor Idiom ... [10.6], [16.18], [16.21]
  609.  * Netiquette ... [5]
  610.    - From: line of a posting ... [5.4]
  611.    - General netiquette ... [5.4]
  612.    - Getting and reading other FAQs ... [5.9]
  613.    - Posting code ... [5.7]
  614.    - Reply-to: line of a posting ... [5.4]
  615.    - Selecting an appropriate newsgroup ... [5.8]
  616.    - Subject: line of a posting ... [5.6]
  617.  * new
  618.    - Advantages over malloc() ... [16.3]
  619.    - Allocating an array with new T[n] ... [16.10]
  620.    - Mixing with free() ... [16.2]
  621.    - (See also Freestore) ... [16.1]
  622.  * New handler (see also Freestore) ... [16.6]
  623.  * Newsgroups
  624.    - comp.graphics ... [5.8]
  625.    - comp.lang.c ... [5.8]
  626.    - comp.lang.c++ ... [5.8]
  627.    - comp.lang.c++.moderated ... [5.8]
  628.    - comp.object ... [5.8]
  629.    - comp.os.ms-windows.programmer.misc ... [5.8]
  630.    - comp.os.ms-windows.programmer.tools ... [5.8]
  631.    - comp.os.msdos.programmer ... [5.8], [35.4]
  632.    - comp.os.msdos.programmer.turbovision ... [5.8]
  633.    - comp.programming ... [5.8]
  634.    - comp.sources.wanted ... [5.8]
  635.    - comp.std.c++ ... [5.8]
  636.    - comp.sys.mac.oop.* ... [5.8]
  637.    - comp.sys.mac.programmer.* ... [5.8]
  638.    - comp.unix.programmer ... [5.8], [35.4]
  639.    - comp.unix.solaris ... [5.8]
  640.    - comp.windows.ms.programmer ... [35.4]
  641.    - gnu.g++.bug ... [5.8]
  642.    - gnu.g++.help ... [5.8]
  643.  * NIHCL (National Institute of Heath Class Library) ... [32.5]
  644.  * No Warranty (see also C++ FAQ Lite) ... [1.4]
  645.  * Nuclear submarine ... [21.2]
  646.  * NULL ... [16.5], [16.6]
  647.  * Numerical Recepies code ... [32.6]
  648.  
  649. "O"
  650.  * Object ... [7.2]
  651.  * Object-oriented: So what? ... [6.3]
  652.  * Old code calls new code ... [6.9]
  653.  * OO design books ... [26.7]
  654.  * ?: operator ... [25.4]
  655.  * Operator ?: ... [25.4]
  656.  * Operator overloading ... [6.7], [13]
  657.    - Assignment operator ... [12], [22.5]
  658.    - Can't invent new operators ... [13.7]
  659.    - Can't replace behavior on builtins ... [13.6]
  660.    - Coding standards ... [25.8]
  661.    - Does help the users of a class ... [13.2]
  662.    - Does not help the developer of a class ... [13.4]
  663.    - Examples ... [13.3]
  664.    - operator!= ... [13.9]
  665.    - operator() ... [13.8]
  666.    - operator++ ... [13.9]
  667.    - operator[] ... [13.8]
  668.    - operator delete(void*) ... [16.8], [16.11]
  669.    - operator delete[](void*) ... [16.11]
  670.    - operator* (dereference operator) ... [13.9]
  671.    - operator>> (istream input) ... [15.7]
  672.    - operator new(size_t) ... [16.9]
  673.    - operator<< (ostream output) ... [15.6]
  674.    - operator<< (ostream output; virtual) ... [15.8]
  675.    - Purpose of operator overloading ... [13.1]
  676.    - Self-assignment ... [12.1], [12.2], [12.3]
  677.    - Which operators can be overloaded ... [13.5]
  678.  * Optimization
  679.    - const_cast ... [18.11]
  680.  * OS/2 ... [15.9]
  681.  * OTOH (Acronym) ... [5.1]
  682.  * Overloading
  683.    - Can't overload by return type ... [34.3]
  684.    - Operators (see Operator overloading) ... [6.7]
  685.  
  686. "P"
  687.  * Paradigm shifts ... [6.6], [29.10]
  688.  * Parameterized types (see also Templates) ... [31.7]
  689.  * Parking lots ... [21.3]
  690.  * Part-of (see also Composition) ... [19.2], [24.2]
  691.  * Pascal vs. C++ ... [6.4]
  692.  * Passing parameters
  693.    - By pointer ... [8.1]
  694.    - By reference ... [8.1], [28.8]
  695.    - By value ... [28.8]
  696.  * Perfect programming languages ... [6.2]
  697.  * Permissions to copy this document ... [1]
  698.  * Permutations ... [5.3]
  699.  * Persistence ... [32.4], [32.5], [34.4]
  700.  * Placement new ... [16.9]
  701.  * Plaintext version of C++ FAQ Lite ... [2.3]
  702.  * Pointer semantics (see also Reference semantics) ... [28.1]
  703.  * Pointer-to-const ... [18.4], [18.5], [18.13]
  704.  * Pointer to function (see Pointer to member) ... [30.1]
  705.  * Pointer to member ... [30]
  706.    - Address of a C++ method ... [30.4]
  707.    - Array of pointer-to-member ... [30.6]
  708.    - Contrast to pointer-to-function ... [30.1]
  709.    - Converting to pointer-to-function ... [30.2], [30.3]
  710.    - Passing as pointer-to-function ... [30.2]
  711.  * Polymorphism ... [6.7]
  712.  * Postfix operators ... [5.3]
  713.  * Posting code (see also Netiquette) ... [5.7]
  714.  * Pragmatics ... [6.1]
  715.  * Precidence ... [13.7]
  716.  * Prepare to die! (see also Destructors) ... [11.1]
  717.  * Pretty printing
  718.    - C++2LaTeX ... [35.2]
  719.    - C-Clearly ... [35.2]
  720.    - GNU indent ... [35.2]
  721.    - tgrind ... [35.2]
  722.  * Prim ... [5.3]
  723.  * private inheritance ... [24], [24.1]
  724.    - Access rules ... [24.6]
  725.    - Compared with composition ... [24.2]
  726.    - Criteria for private inheritance vs. composition ... [24.3]
  727.    - Derived* to private Base* conversion (invalid) ... [24.4]
  728.    - private vs. protected inheritance ... [24.5]
  729.  * private: members ... [19.5], [19.6]
  730.  * Proficiency in OO/C++: How long does it take ... [6.6]
  731.  * protected inheritance
  732.    - Access rules ... [24.6]
  733.    - protected vs. private inheritance ... [24.5]
  734.  * protected: members ... [19.5]
  735.    - The protected: interface ... [19.7]
  736.  * public: inheritance ... [19], [20], [21], [22], [23]
  737.  * public: members ... [19.5]
  738.    - The public: interface ... [19.7]
  739.  * Pure OO programming languages ... [26.3]
  740.  * Pure virtual functions ... [22.3], [22.4]
  741.  
  742. "Q"
  743.  * Quick-sort ... [5.3]
  744.  
  745. "R"
  746.  * realloc() (see also Freestore) ... [16.4]
  747.  * Recent changes to this document (see also C++ FAQ Lite) ... [4]
  748.  * Redefining non-virtuals ... [23.2]
  749.  * Reference counting
  750.    - Copy on write ... [16.20], [16.21]
  751.    - Pointer semantics ... [16.19]
  752.    - Reference semantics ... [16.20]
  753.    - Reference semantics for a hierarchy ... [16.21]
  754.  * Reference semantics ... [28], [28.7], [28.8]
  755.  * References ... [8]
  756.    - Assigning a reference ... [8.2]
  757.    - References to const ... [18.1], [18.6]
  758.    - References vs. pointers ... [8.5]
  759.    - Reseating a reference ... [8.4], [18.7], [18.8]
  760.    - Returning a reference ... [8.3]
  761.  * Reply-to: line of a posting (see also Netiquette) ... [5.4]
  762.  * Return type ... [34.3]
  763.  * RTFM (Acronym) ... [5.1]
  764.  * rtfm.mit.edu ... [5.9]
  765.  * Runtime crashes without any warning ... [11.5], [11.6], [16.2], [16.4],
  766.    [16.11], [16.12], [17.3], [20.4], [21.1], [21.4], [21.5], [34.2]
  767.  
  768. "S"
  769.  * Security vs. Encapsulation (see also Encapsulation) ... [7.7]
  770.  * Self-assignment ... [12.1], [12.2], [12.3], [25.8]
  771.  * Self-cleaning member objects ... [17.2]
  772.  * set_new_handler (see also Freestore) ... [16.6]
  773.  * Short-courses (one 40 hour workweek) ... [6.6]
  774.  * Shortest path in C++ ... [5.3]
  775.  * Smalltalk ... [27]
  776.    - Differences with C++ ... [27.1]
  777.    - Dynamic type checking ... [27.2]
  778.    - Inheritance differences ... [27.4], [27.5]
  779.    - Language wars vs. C++ ... [6.4]
  780.    - Not an efficient way to learn OO/C++ ... [26.3]
  781.  * Smart pointers ... [13.3], [16.19], [17.2]
  782.  * SO (Acronym) ... [5.1]
  783.  * Solaris ... [5.8]
  784.  * Sorting in C++ ... [5.3]
  785.  * Source filename extensions ... [25.6]
  786.  * Spanning Trees in C++ ... [5.3]
  787.  * Specialization (see also Inheritance) ... [19.3]
  788.  * Standardization issues ... [5.8], [6.11], [6.12], [27.1]
  789.  * Static
  790.    - Common linker errors due to static data members ... [10.8]
  791.    - Define static data members explicitly ... [10.7], [10.8]
  792.    - Named Constructor Idiom using static ... [10.6], [16.18], [16.21]
  793.    - static at file-scope (Don't!) ... [7.5]
  794.    - Static binding ... [20.2], [20.3]
  795.    - static create() methods ... [10.6], [16.18], [16.21]
  796.    - Static typing ... [20.2], [27.2], [27.3]
  797.  * Status bar with MFC ... [33.1]
  798.  * stdio.h ... [15.1]
  799.  * STL ... [32.2]
  800.    - Access to on-line help ... [32.3]
  801.    - FTP sites ... [32.1]
  802.    - map<Key,Value> ... [31.1]
  803.    - vector<T> ... [10.5], [16.17], [21.4], [21.5], [32.2]
  804.  * string: Better than char* ... [13.6], [17.3]
  805.  * struct ... [7.1], [7.8]
  806.  * Style guidelines (see Coding standards) ... [25]
  807.  * Subclass
  808.    - See also Inheritance ... [19.3]
  809.    - Subclasses that aren't subtypes ... [27.5]
  810.  * Subject: line of a posting (see also Netiquette) ... [5.6]
  811.  * Submarines, Nuclear ... [21.2]
  812.  * Subscript operator for Matrix ... [13.8]
  813.  * Substitutability ... [21.3], [21.4], [21.6], [21.7], [21.8]
  814.  * Subtypes that aren't subclasses ... [27.5]
  815.  * Superclass (see also Inheritance) ... [19.3]
  816.  * Syntactic sugar ... [13.1]
  817.  
  818. "T"
  819.  * .tar.gz (see Downloading) ... [2.2], [2.3]
  820.  * .tar.Z (see Downloading) ... [2.2], [2.3]
  821.  * Templates ... [31]
  822.    - Basics of templates ... [31.4]
  823.    - Class template is a family of classes ... [31.6]
  824.    - Function template is a family of functions ... [31.5]
  825.    - Genericity ... [31.8]
  826.    - Parameterized types ... [31.7]
  827.  * Ternary operator: ?: ... [25.4]
  828.  * TeX macros for "C++" ... [35.1]
  829.  * tgrind (see Pretty printing) ... [35.2]
  830.  * This document (see also C++ FAQ Lite) ... [3]
  831.  * throw ... [16.5], [16.6]
  832.  * To-the-power-of operator** (Can't!) ... [13.7]
  833.  * Todd Hoff's coding guidelines (see also Coding standards) ... [25.10]
  834.  * Training ... [6.6]
  835.  * Transitivity ... [14.4]
  836.  * Type safety
  837.    - Comparison with Smalltalk ... [27.2]
  838.    - Const correctness ... [18.2]
  839.    - Static vs. dynamic typing ... [20.2]
  840.  * typeid() ... [31.2]
  841.  
  842. "U"
  843.  * Uncompiling executables back into C++ source code ... [33.2]
  844.  * Unix ... [5.8], [35.4]
  845.  * Unresolved external (see also Linker errors) ... [23.4]
  846.  * Usenet newsgroups (see also Newsgroups) ... [5.8]
  847.  
  848. "V"
  849.  * v-pointer (see also virtual) ... [20.3], [33.6]
  850.  * v-table (see also virtual) ... [20.3], [21.4], [23.4], [33.6]
  851.  * Value semantics ... [28], [28.7], [28.8]
  852.  * vector<T> (see also STL) ... [10.5], [16.17], [21.4], [21.5], [32.2]
  853.  * Version numbers to the "language" ... [33.9]
  854.  * virtual
  855.    - Binary compatibility of virtual functions ... [33.6]
  856.    - Calling virtual functions from constructors ... [23.1]
  857.    - Calling virtual functions from destructors ... [23.1]
  858.    - Inlining virtual functions ... [28.5], [28.6]
  859.    - Pure virtual functions ... [22.3], [22.4]
  860.    - Redefining non-virtual member functions ... [23.2]
  861.    - v-pointer (virtual pointer) ... [20.3], [33.6]
  862.    - v-table (virtual table) ... [20.3], [21.4], [23.4], [33.6]
  863.    - Virtual Constructor Idiom ... [16.21], [20.5], [22.5]
  864.    - virtual data ... [28.2], [28.3]
  865.    - virtual destructor coding standard ... [20.4], [25.8]
  866.    - Virtual Friend Function Idiom ... [14.3], [15.8]
  867.    - virtual functions ... [20]
  868.    - virtual functions are central to OO ... [6.8]
  869.    - virtual functions let old code call new code ... [6.9]
  870.    - virtual functions, purpose of ... [20.1]
  871.    - virtual inheritance ... [11.12], [29.8], [29.9], [33.6], [33.9]
  872.  * Visual Basic vs. C++ ... [6.4]
  873.  
  874. "W"
  875.  * Wars ... [25.1]
  876.  * WWW sites of this document ... [2.1]
  877.  
  878. "X"
  879.  * X3 Secretariat ... [6.12]
  880.  
  881. "Y"
  882.  * Yaccable grammar ... [33.8]
  883.  
  884. "Z"
  885.  * .zip (see Downloading) ... [2.2], [2.3]
  886.  * Zombie objects ... [17.1]
  887.  
  888. ==============================================================================
  889.  
  890. SECTION [1]: Copying permissions
  891.  
  892.  
  893. [1.1] Author
  894.  
  895. Marshall Cline, cline@parashift.com
  896. Paradigm Shift, Inc.
  897. One Park St.
  898. Norwood, NY 13668
  899. 315-353-6100 (voice)
  900. 315-353-6110 (fax)
  901.  
  902. ==============================================================================
  903.  
  904. [1.2] Copyright Notice
  905.  
  906. The entire C++ FAQ Lite document is Copyright (C) 1991-96 Marshall P. Cline,
  907. Ph.D., cline@parashift.com.  All rights reserved.  Copying is permitted only
  908. under designated situations[1.3].
  909.  
  910. ==============================================================================
  911.  
  912. [1.3] Copying Permissions [UPDATED!]
  913.  
  914. [Recently simplified (on 1/97).]
  915.  
  916. If all you want to do is quote a small portion of C++ FAQ Lite (such as one or
  917. two FAQs) in a larger document, simply attribute the quoted portion with
  918. something vaguely similar to, "From Marshall Cline's C++ FAQ Lite document,
  919. http://www.cerfnet.com/~mpcline/c++-faqs-lite/".
  920.  
  921. If you want to make a copy of large portions and/or the entire C++ FAQ Lite
  922. document for your own personal use, you may do so without restriction
  923. (provided, of course, that you don't redistribute the document to others, or
  924. allow others to copy the document).
  925.  
  926. If you want to redistribute large portions and/or the entire C++ FAQ Lite
  927. document to others, whether or not for commercial use, you must get permission
  928. from the author first (and that permission is normally granted; note however
  929. that it's often easier for you to simply tell your recepients about the
  930. one-click download option[2.2]).  In any event, you must retain and
  931. consipicuously display all copyright notices on all copies of the documents you
  932. copy, and you must include and conspicuously display the Author[1.1], Copyright
  933. Notice[1.2], No Warranty[1.4], C++-FAQ-Lite != C++-FAQ-Book[1.5], and Copying
  934. Permissions[1.3] items, and display these items conspicuously.
  935.  
  936. If you want more and/or different privileges than are outlined here, please
  937. contact me, cline@parashift.com.  I'm a very reasonable man...
  938.  
  939. ==============================================================================
  940.  
  941. [1.4] No Warranty
  942.  
  943. THIS WORK IS PROVIDED ON AN "AS IS" BASIS.  THE AUTHOR PROVIDES NO WARRANTY
  944. WHATSOEVER, EITHER EXPRESS OR IMPLIED, REGARDING THE WORK, INCLUDING WARRANTIES
  945. WITH RESPECT TO ITS MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE.
  946.  
  947. ==============================================================================
  948.  
  949. [1.5] C++-FAQ-Lite != C++-FAQ-Book
  950.  
  951. This document, C++ FAQ Lite, is not the same as the C++ FAQ Book.  The book
  952. (C++ FAQ, Cline and Lomow, Addison-Wesley) is 500% larger than this document,
  953. and is available in bookstores.  See [3] for details.
  954.  
  955. ==============================================================================
  956.  
  957. SECTION [2]: On-line sites that distribute this document
  958.  
  959.  
  960. [2.1] Where's the closest mirror site to access this document? [UPDATED!]
  961.  
  962. [Recently removed the "USA-2" site (on 1/97).]
  963.  
  964. You'll get better response time by choosing a close site:
  965.  * USA: http://www.cerfnet.com/~mpcline/c++-faq-lite/
  966.  * U.K.: http://www.cs.bham.ac.uk/~jdm/CPP/index.html
  967.  * Germany: http://www.informatik.uni-konstanz.de/~kuehl/cpp/cppfaq.htm
  968.  * Finland: http://www.utu.fi/~sisasa/oasis/cppfaq/
  969.  * Taiwan: http://www.cis.nctu.edu.tw/c++/C++FAQ-English/
  970.  
  971. ==============================================================================
  972.  
  973. [2.2] How can I get a Copy of all the HTML files of C++ FAQ Lite so I can read
  974.       them Off-Line? [NEW!]
  975.  
  976. [Recently created (on 11/96) and rewrote and added a one-click feature to get
  977. .zip, .tar.Z or .tar.gz format (on 1/97).]
  978.  
  979. Here's how you can get a bundled and compressed copy of the HTML files of C++
  980. FAQ Lite:
  981.  
  982.  1. Decide between .zip, .tar.Z, or .tar.gz formats and send an (empty) e-mail
  983.     message to the associated address (.zip is common on Windows and the Mac;
  984.     .tar.Z and .tar.gz are common on UNIX): for a .zip file, use
  985.     cline-c++-faq-html-zip@crynwr.com; for a .tar.Z file, use
  986.     cline-c++-faq-html-tarz@crynwr.com; for a .tar.gz file, use
  987.     cline-c++-faq-html-targz@crynwr.com.
  988.  
  989.  2. Wait a few minutes, then check your e-mail.  If you don't receive an e-mail
  990.     message containing the bundled FAQ, wait a while longer and check again.
  991.     If you still haven't received it after waiting an entire day, something is
  992.     wrong and you can send me e-mail or try again.
  993.  
  994.  3. Once you receive the FAQ in your e-mail, unpack the FAQ using the
  995.     instructions contained in the associated e-mail message.
  996.  
  997. Note: e-mail was selected as the preferred delivery mechanism because it's the
  998. best choice for people overseas (so they don't have to wait while the packets
  999. cross the ocean).  So please please don't send me e-mail asking for an FTP
  1000. address since there isn't one.  Thanks!
  1001.  
  1002. Restriction: you must still abide by the Copyright Notice[1.2] and Copying
  1003. Permissions[1.3].  In particular, you must not redistribute C++ FAQ Lite to
  1004. others without permission from the author[1.1].  If you want to redistribute
  1005. C++ FAQ Lite to someone else, the easiest way is to tell them about this
  1006. one-click download feature[2.2], and let them get their own copy.
  1007.  
  1008. Restriction: the FAQ uses "long filenames." If your machine can't handle long
  1009. filenames (e.g., if it's DOS and/or Windows 3.x), you cannot unpack the FAQ.
  1010. UNIX, Windows NT, Windows 95, and Mac all handle long filenames correctly.
  1011.  
  1012. ==============================================================================
  1013.  
  1014. [2.3] How can I get a Copy of all the "plaintext" files of C++ FAQ Lite so I
  1015.       can read them Off-Line? [UPDATED!]
  1016.  
  1017. [Recently rewrote and added a one-click feature to get .zip, .tar.Z or .tar.gz
  1018. format (on 1/97).]
  1019.  
  1020. The "plaintext" version of C++ FAQ Lite is posted monthly on comp.lang.c++.
  1021. These simple text files are mechanically produced by stripping the HTML tags
  1022. from the HTML files on the Web site.  Therefore the plaintext files aren't as
  1023. pretty to look at and don't have the hyper-linked corss references, but they
  1024. have basically the same information as the HTML files.
  1025.  
  1026. Here's how you can get a bundled and compressed copy of the plaintext files of
  1027. C++ FAQ Lite:
  1028.  
  1029.  1. Decide between .zip, .tar.Z, or .tar.gz formats and send an (empty) e-mail
  1030.     message to the associated address (.zip is common on Windows and the Mac;
  1031.     .tar.Z and .tar.gz are common on UNIX): for a .zip file, use
  1032.     cline-c++-faq-plaintext-zip@crynwr.com; for a .tar.Z file, use
  1033.     cline-c++-faq-plaintext-tarz@crynwr.com; for a .tar.gz file, use
  1034.     cline-c++-faq-plaintext-targz@crynwr.com.
  1035.  
  1036.  2. Wait a few minutes, then check your e-mail.  If you don't receive an e-mail
  1037.     message containing the bundled FAQ, wait a while longer and check again.
  1038.     If you still haven't received it after waiting an entire day, something is
  1039.     wrong and you can send me e-mail or try again.
  1040.  
  1041.  3. Once you receive the FAQ in your e-mail, unpack the FAQ using the
  1042.     instructions contained in the associated e-mail message.
  1043.  
  1044. Note: e-mail was selected as the preferred delivery mechanism because it's the
  1045. best choice for people overseas (so they don't have to wait while the packets
  1046. cross the ocean).  So please please don't send me e-mail asking for an FTP
  1047. address since there isn't one (e.g., rtfm.mit.edu always seems hopelessly
  1048. out-of-date).  Thanks!
  1049.  
  1050. Restriction: you must still abide by the Copyright Notice[1.2] and Copying
  1051. Permissions[1.3].  In particular, you must not redistribute C++ FAQ Lite to
  1052. others without permission from the author[1.1].  If you want to redistribute
  1053. C++ FAQ Lite to someone else, the easiest way is to tell them about this
  1054. one-click download feature[2.2], and let them get their own copy.
  1055.  
  1056. ==============================================================================
  1057.  
  1058. [2.4] Where can I download a Chinese translation of this on-line document?
  1059.  
  1060. http://www.cis.nctu.edu.tw/c++/C++FAQ-Chinese/ contains a Chinese translation
  1061. encoded in the "Big5" code.  Note: "Big5" is a 16-bit Chinese code used mostly
  1062. in Taiwan.
  1063.  
  1064. ==============================================================================
  1065.  
  1066. SECTION [3]: C++-FAQ-Book versus C++-FAQ-Lite
  1067.  
  1068.  
  1069. [3.1] Is there a C++ FAQ Book I can buy in a bookstore?
  1070.  
  1071. Yes.  C++ FAQ by Cline and Lomow, Addison-Wesley, 1995, ISBN 0-201-58958-3.
  1072.  
  1073. ==============================================================================
  1074.  
  1075. [3.2] Is this on-line ("Lite") document the same as the C++ FAQ Book?
  1076.  
  1077. No!
  1078.  
  1079. Many people have asked about the relationship between the book and this Lite
  1080. document.  In particular, many have wondered whether this Lite document and the
  1081. book are equivalent.  They are not.
  1082.  
  1083. The book (C++ FAQ, Addison-Wesley, 1995) contains roughly 500% more information
  1084. than this Lite document.  For example, the book covers both a wider variety of
  1085. topics and provides deeper details and insights than this Lite document.  The
  1086. book also includes thousands of cross references, external references, and
  1087. index terms, as well as many more programming examples.
  1088.  
  1089. ==============================================================================
  1090.  
  1091. [3.3] How can I download a free copy of the C++ FAQ Book?
  1092.  
  1093. URL: sneaker-net://your.local.bookstore/tech-section/ISBN=0-201-58958-3
  1094.  
  1095. In other words, the book is available in bookstores (C++ FAQs, Addison-Wesley,
  1096. 1995; ISBN 0-201-58958-3).  It is not available in any on-line forum.
  1097.  
  1098. Note that you can get a peek at some excerpts from the book via
  1099. http://www.aw.com/cseng/authors/cline/FAQ/FAQ.html
  1100.  
  1101. ==============================================================================
  1102.  
  1103. [3.4] Why would I spend good money on a book when I can download it for free?
  1104.  
  1105. Because you can't download the contents of the book for free.
  1106.  
  1107. The book and this Lite document are not the same.  The book contains 500% more
  1108. material than this Lite document.
  1109.  
  1110. ==============================================================================
  1111.  
  1112.